//package com.anyou.mall.pla.controller;
//
//import java.util.List;
//import javax.servlet.http.HttpServletResponse;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.anyou.common.annotation.Log;
//import com.anyou.common.core.controller.BaseController;
//import com.anyou.common.core.domain.ApiResult;
//import com.anyou.common.enums.BusinessType;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import com.anyou.mall.pla.domain.VisibleUserTypeRelation;
//import com.anyou.mall.pla.service.IVisibleUserTypeRelationService;
//import com.anyou.common.utils.poi.ExcelUtil;
//import com.anyou.common.core.page.TableDataInfo;
//
///**
// * 可看用户类型关系Controller
// *
// * @author gaochaohao
// * @date 2022-04-13
// */
//@Api(tags = "可看用户类型关系")
//@RestController
//@RequestMapping("/pla/visibleUserTypeRelation")
//public class VisibleUserTypeRelationController extends BaseController
//{
//    @Autowired
//    private IVisibleUserTypeRelationService visibleUserTypeRelationService;
//
//    /**
//     * 查询可看用户类型关系列表
//     */
//    @ApiOperation("查询可看用户类型关系列表")
//    @PreAuthorize("@ss.hasPermi('pla:visibleUserTypeRelation:list')")
//    @GetMapping("/list")
//    public TableDataInfo<List<VisibleUserTypeRelation>> list(VisibleUserTypeRelation visibleUserTypeRelation)
//    {
//        startPage();
//        List<VisibleUserTypeRelation> list = visibleUserTypeRelationService.selectVisibleUserTypeRelationList(visibleUserTypeRelation);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出可看用户类型关系列表
//     */
//    @ApiOperation("导出可看用户类型关系列表")
//    @PreAuthorize("@ss.hasPermi('pla:visibleUserTypeRelation:export')")
//    @Log(title = "可看用户类型关系", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, VisibleUserTypeRelation visibleUserTypeRelation)
//    {
//        List<VisibleUserTypeRelation> list = visibleUserTypeRelationService.selectVisibleUserTypeRelationList(visibleUserTypeRelation);
//        ExcelUtil<VisibleUserTypeRelation> util = new ExcelUtil<VisibleUserTypeRelation>(VisibleUserTypeRelation.class);
//        util.exportExcel(response, list, "可看用户类型关系数据");
//    }
//
//    /**
//     * 获取可看用户类型关系详细信息
//     */
//    @ApiOperation("获取可看用户类型关系详细信息")
//    @PreAuthorize("@ss.hasPermi('pla:visibleUserTypeRelation:query')")
//    @GetMapping(value = "/{visibleUserTypeRelationId}")
//    public ApiResult<VisibleUserTypeRelation> getInfo(@PathVariable("visibleUserTypeRelationId") Long visibleUserTypeRelationId)
//    {
//        return ApiResult.success(visibleUserTypeRelationService.selectVisibleUserTypeRelationByVisibleUserTypeRelationId(visibleUserTypeRelationId));
//    }
//
//    /**
//     * 新增可看用户类型关系
//     */
//    @ApiOperation("新增可看用户类型关系")
//    @PreAuthorize("@ss.hasPermi('pla:visibleUserTypeRelation:add')")
//    @Log(title = "可看用户类型关系", businessType = BusinessType.INSERT)
//    @PostMapping
//    public ApiResult add(@RequestBody VisibleUserTypeRelation visibleUserTypeRelation)
//    {
//        return ApiResult.success(visibleUserTypeRelationService.insertVisibleUserTypeRelation(visibleUserTypeRelation));
//    }
//
//    /**
//     * 修改可看用户类型关系
//     */
//    @ApiOperation("修改可看用户类型关系")
//    @PreAuthorize("@ss.hasPermi('pla:visibleUserTypeRelation:edit')")
//    @Log(title = "可看用户类型关系", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public ApiResult edit(@RequestBody VisibleUserTypeRelation visibleUserTypeRelation)
//    {
//        return ApiResult.success(visibleUserTypeRelationService.updateVisibleUserTypeRelation(visibleUserTypeRelation));
//    }
//
//    /**
//     * 删除可看用户类型关系
//     */
//    @ApiOperation("删除可看用户类型关系")
//    @PreAuthorize("@ss.hasPermi('pla:visibleUserTypeRelation:remove')")
//    @Log(title = "可看用户类型关系", businessType = BusinessType.DELETE)
//    @DeleteMapping("/{visibleUserTypeRelationIds}")
//    public ApiResult remove(@PathVariable Long[] visibleUserTypeRelationIds)
//    {
//        return ApiResult.success(visibleUserTypeRelationService.deleteVisibleUserTypeRelationByVisibleUserTypeRelationIds(visibleUserTypeRelationIds));
//    }
//}
